﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Library.DB.Banner;
using Com.Library.Page;

namespace Com.Web.coffinegurunaru.manager.banner
{
	public partial class bannerMethod : ManagerAjaxPage
	{
		public void Create(int BannerID, string ImageURL, string Link, byte CodeLinkType)
		{
			string ManagerName = this.WebCookies.ManagerName;
			BannerModel.Create(BannerID, ImageURL, Link, (CodeLinkType)CodeLinkType, ManagerName);
		}

		public void Modify(int SeqNo, string ImageURL, string Link, byte CodeLinkType)
		{
			string ManagerName = this.WebCookies.ManagerName;
			BannerModel.Modify(SeqNo, ImageURL, Link, (CodeLinkType)CodeLinkType, ManagerName);
		}

		public void Remove(int SeqNo)
		{
			BannerModel.Remove(SeqNo);
		}

		public string GetList(int BannerID)
		{
			List<BannerEntity> BannerList = BannerModel.GetList(BannerID, 1, 20);
			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("BannerList", BannerList);
			string retValue = ViewManager<ManagerPage>.Render("/manager/banner/bannerList.ascx", properties);

			return retValue;
		}
	}
}
